%tr.success
  %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:10px;border-radius:3px;font-size:14px;line-height:1.3;text-align:center;overflow:hidden;color:#ffffff;background-color:#108548;" }
    %table.img{ border: "0", cellpadding: "0", cellspacing: "0", style: "border-collapse:collapse;margin:0 auto;" }
      %tbody
        %tr
          %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;vertical-align:middle;color:#ffffff;text-align:center;padding-right:5px;" }
            %img{ alt: "✓", height: "16", src: image_url('mailers/ci_pipeline_notif_v2/check.png'), style: "display:block;", width: "16" }
          %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;vertical-align:middle;color:#ffffff;text-align:center;" }
            %span= _('Merge request was set to auto-merge')
%tr.spacer
  %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;height:18px;font-size:18px;line-height:18px;" }
    &nbsp;
%tr.section
  %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:1.4;text-align:center;padding:0 15px;border:1px solid #ededed;border-radius:3px;overflow:hidden;" }
    %table.img{ border: "0", cellpadding: "0", cellspacing: "0", style: "border-collapse:collapse;width:100%;" }
      %tbody
        %tr{ style: 'width:100%;' }
          %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;text-align:center;" }
            %img{ src: image_url('mailers/approval/icon-merge-request-gray.gif'), style: "height:16px;width:16px;margin-bottom:2px;vertical-align:bottom;", alt: "Merge request icon" }
            %span{ style: "font-weight: 600;color:#333333;" }= _('Merge request')
            %a{ href: merge_request_url(@merge_request), style: "font-weight: 600;color:#3777b0;text-decoration:none" }= @merge_request.to_reference
            %span= _('was set to auto-merge by')
            %img.avatar{ height: "24", src: avatar_icon_for_user(@mwps_set_by, 24, only_path: false), style: "border-radius:12px;margin-left:3px;vertical-align:bottom;", width: "24", alt: "Avatar" }
            %a.muted{ href: user_url(@mwps_set_by), style: "color:#333333;text-decoration:none;" }
              = @mwps_set_by.name
  %tr.spacer
    %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;height:18px;font-size:18px;line-height:18px;" }
      &nbsp;
  %tr.section
    %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 15px;border:1px solid #ededed;border-radius:3px;overflow:hidden;" }
      %table.info{ border: "0", cellpadding: "0", cellspacing: "0", style: "text-align:left;width:100%;" }
        %tbody
          %tr
            %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;" }= _('Project')
            -# haml-lint:disable NoPlainNodes
            %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;" }
              - namespace_name = @project.group ? @project.group.name : @project.namespace.owner.name
              - namespace_url = @project.group ? group_url(@project.group) : user_url(@project.namespace.owner)
              %a.muted{ href: namespace_url, style: "color:#333333;text-decoration:none;" }
                = namespace_name
              \/
              %a.muted{ href: project_url(@project), style: "color:#333333;text-decoration:none;" }
                = @project.name
          %tr
            %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;border-top:1px solid #ededed;" }= _('Branch')
            %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;" }
              %table.img{ border: "0", cellpadding: "0", cellspacing: "0", style: "border-collapse:collapse;" }
                %tbody
                  %tr
                    %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;padding-right:5px;" }
                      %img{ height: "13", src: image_url('mailers/ci_pipeline_notif_v2/icon-branch-gray.gif'), style: "display:block;", width: "13", alt: "Branch icon" }
                    %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;" }
                      %span.muted{ style: "color:#333333;text-decoration:none;" }
                        = @merge_request.source_branch
          %tr
            %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;border-top:1px solid #ededed;" }= _('Author')
            %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#737278;font-weight:400;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;" }
              %table.img{ border: "0", cellpadding: "0", cellspacing: "0", style: "border-collapse:collapse;" }
                %tbody
                  %tr
                    %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;padding-right:5px;" }
                      %img.avatar{ height: "24", src: avatar_icon_for_user(@merge_request.author, 24, only_path: false), style: "display:block;border-radius:12px;margin:0;", width: "24", alt: "Avatar" }
                    %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;" }
                      %a.muted{ href: user_url(@merge_request.author), style: "color:#333333;text-decoration:none;" }
                        = @merge_request.author.name

          - if @merge_request.assignees.any?
            = render 'users_list', users: @merge_request.assignees, user_label: assignees_label(@merge_request, include_value: false)

          - if @merge_request.reviewers.any?
            = render 'users_list', users: @merge_request.reviewers, user_label: reviewers_label(@merge_request, include_value: false)

= render_if_exists 'layouts/mailer/additional_text'
- if @target_url
  = email_action @target_url
